In [1]:
include("testRRTstar.jl")
main()



 - pathfound true - 

Out[1]:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Week 10 RRT [ 03 Dec 2017 23:57:25 ] 200 samples, connectRadius = 3.0, pathcost = 35.8

In [3]:
include("testRRT.jl")
main()


MethodError: no method matching algT.TreeNode(::Int64, ::GeometryTypes.Point{2,Float64})

Stacktrace:
 [1] rrtPlan(::algT.Room, ::algT.AlgParameters, ::GeometryTypes.Point{2,Float64}, ::GeometryTypes.Point{2,Float64}, ::Array{GeometryTypes.HyperRectangle,1}) at /home/nrw/Documents/299r/janson299r/wk11/RRT.jl:347
 [2] main() at /home/nrw/Documents/299r/janson299r/wk11/testRRT.jl:48
 [3] include_string(::String, ::String) at ./loading.jl:522

In [ ]:
a= Point(1,2)
b = Point(4,5)
min_euclidean(Vec(a),Vec(b))

In [ ]:
mutable struct edge
    startID
    endID
end


mutable struct gnode
id
parentid
state
cost
#tnode() = (a= new(); a.state = -1; a.cost = 99999)
gnode() = new()
end

a = edge(1,2)
b = edge(2,3)
c = edge(6,5)

foo = [a, b, c]
foo = Vector{edge}()
push!(foo, a, b,c)

d = edge(1,1)
e = edge(6,5)


Base.isequal(q1::edge, q2::edge) = q1.startID == q2.startID && q1.endID == q2.endID
#Base.==(q1::edge, q2::edge) = q1.startID == q2.startID && q1.endID == q2.endID


findin(foo, [e])


i = findfirst(foo) do y
    y.startID == e.startID && y.endID == e.endID
end

deleteat!(foo, i)


foo
for i in foo
    i.startID = 1
end

foo


a = gnode(); a.id = 2; a.parentid =3;
a

typeof(a)

mutable struct Node2 id cost end

a= Node2(1,2) a.id

findfirst(y -> y > 7, x)v 

myfilter(y) = y > 2
milter = y-> Y > 2

(y -> y > 2).(x)


first argument by convention

findfirst(x) do y
 z = y+2
 z > 2
end

returns 0 if not work